package com.ocean.admin.model.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 保存用户信息DTO
 *
 * @author zhang
 * @since 2022/8/23
 */
@Data
public class SysUserSaveDTO {

    /**
     * 岗位ID组
     */
    @Schema(description = "岗位ID组")
    private Long[] postIds;

    /**
     * 角色组ID组
     */
    @Schema(description = "角色组ID组")
    private Long[] roleIds;

    /**
     * 部门ID
     */
    @Schema(description = "部门ID")
    private Long deptId;

    /**
     * 所属机构ID
     */
    @Schema(description = "所属机构ID")
    private Long orgId;

    /**
     * 用户账号
     */
    @NotBlank(message = "请输入用户账号")
    @Schema(description = "用户账号", required = true)
    private String userName;

    /**
     * 用户昵称
     */
    @NotBlank(message = "请输入用户昵称")
    @Schema(description = "用户昵称", required = true)
    private String nickName;

    /**
     * 用户邮箱
     */
//    @Pattern(regexp = "[a-zA-Z0-9]+@[a-zA-Z0-9]+\\\\.[a-zA-Z0-9]+", message = "邮箱格式错误")
    @Schema(description = "用户邮箱")
    private String email;

    /**
     * 手机号码
     */
//    @Pattern(regexp = "^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\\\\d{8}$", message = "手机号格式错误")
    @Schema(description = "手机号码")
    private String phoneNumber;

    /**
     * 用户性别（0男 1女 2未知）
     */
    @Schema(description = "用户性别（0男 1女 2未知）")
    private String sex;

    /**
     * 密码
     */
    @NotBlank(message = "请输入密码")
    @Schema(description = "密码", required = true)
    private String password;

    /**
     * 帐号状态（0正常 1停用）
     */
    @Schema(description = "帐号状态（0正常 1停用）")
    private String status;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}
